
<ui:composition  xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	
	<h:form id="loginForm" rendered="#{!userBean.isLoggedIn}">
		<p:outputLabel>Username:</p:outputLabel>
		<p:inputText id="name" value="#{userBean.tempUser.name}" />
		<p:outputLabel>Password</p:outputLabel>
		<p:password id="password" type="" value="#{userBean.tempUser.password}" />
		<p:commandButton value="Login" update="loginForm"
			actionListener="#{userBean.login}" />
		
	</h:form>
	<h:form id="welcomeform" rendered="#{userBean.isLoggedIn}">
	<p:outputLabel>Welcome #{userBean.tempUser.name}</p:outputLabel>
	</h:form>

</ui:composition>